﻿using Lightworks.Core.Entity;
using SqlSugar;
using System.ComponentModel.DataAnnotations;

namespace Lightworks.System.Models
{
    [SugarTable("sys_resource")]
    public class Resource : TreeEntity<Resource>
    {
        [Required]
        public string? Name { get; set; }
        public string? Path { get; set; }
        [SugarColumn(IsJson = true)]
        public Meta? Meta { get; set; }
        public string? Redirect { get; set; }
        public string? Component { get; set; }
        [SugarColumn(IsJson = true)]
        public List<Dictionary<string, string>>? ApiList { get; set; }
        public string? Type { get; set; }
        public bool IsHidden {  get; set; }
    }

    public class Meta 
    {
        public string? Title { get; set;  }
        public string? Icon { get; set; }
        public string? Active { get; set; }
        public string? Color { get; set; }
        public string? Type { get; set; }
        public bool Fullpage { get; set; }
        public string? Tag { get; set; }
        public bool Hidden { get; set; }
        public bool HiddenBreadcrumb { get; set; }
     }
}
